{% extends 'index.html' %}
{% load staticfiles %}
{% block nav-head %}
	{{ block.super }}
{% endblock %}
{% block nav-top %}
       {{ block.super }}
{% endblock %}
{% block nav-side %}
	{{ block.super }}
{% endblock %}
{% block content %}
        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <br />
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            服务器列表
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <div class="dataTable_wrapper">
                                <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                                    <thead>
                                        <tr>
                                            <th width="10%">名称</th>
											<th width="10%">IP</th>
											<th width="10%">服务代码</th>
											<th width="10%">品牌型号</th>
											<th width="10%">机房</th>
											<th width="10%">在保</th>
                                            <th width="10%">备注</th>
                                        </tr>
                                    </thead>
                                    <tbody>
									
{% for server in server_lists %}
                                        <tr class="odd gradeX">
                                            <td>{{server.name}}</td>
                                            <td>{{server.ip}}</td>
											<td><a href="{{ server.sn }}" title="序列号：{{ server.sn }}">{{server.sid}}</a> </td>
                                            <td><a href="#" target="_ablank" title="{{ server.mod }}
{{ server.feature }}">{{server.get_manufacturer_display}}</a></td>
                                            <td><a href="#" title="{{server.cabinet}}">{{server.get_idc_display }}</a> </td>
                                            <td>
                                                {% if server.buy_date == 1 %}
                                                    <span style="color: #3f903f;" ><a href="#" title="过保时间：{{ server.service_range }}">在保</a> </span>
                                                {% elif server.buy_date == 2 %}
                                                    <span style="color: #FF0000;"> <a href="#" title="过保时间：{{ server.service_range }}">过保</a></span>
                                                {% elif server.buy_date == 0 %}
                                                    <span style="color:blue;"><a href="#" title="过保时间：{{ server.service_range }}">未知</a></span>
                                                {% endif %}
                                            </td>
                                            <td>{{ server.comment }}</td>
                                        </tr>
{% endfor %}
                                    </tbody>
                                </table>
                            </div>
                        <!-- /.panel-body -->
                        </div>
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
        </div>
        <!-- /#page-wrapper -->
{% endblock %}
{% block theme %}
	<!-- Custom Theme JavaScript -->
    <script src="{% static 'js/sb-admin-2.js' %}"></script>
	 <!-- DataTables JavaScript -->
    <script src="{% static 'js/jquery.dataTables.min.js' %}"></script>
    <script src="{% static 'js/dataTables.bootstrap.min.js' %}"></script>

    <script>
    $(document).ready(function() {
        $('#dataTables-example').DataTable({
                responsive: true
        });
    });
    </script>
{% endblock %}







